package com.qdhh.enrollment.service;

import com.qdhh.enrollment.dto.QuestionImportDTO;
import com.qdhh.enrollment.model.QuizQuestion;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

public interface QuizService {

    List<QuizQuestion> pickForExam(int total, Map<String, Integer> typeQuota);

    int score(Map<String, String> submitted, List<QuizQuestion> questions);

    List<QuizQuestion> listByIds(List<String> ids);

    void seedSampleDataIfNeeded();
    
    /**
     * 从CSV输入流导入题目
     */
    QuestionImportDTO importQuestionsFromCSV(InputStream inputStream);
    
    /**
     * 批量保存题目
     */
    void saveBatch(List<QuizQuestion> questions);
}
